function [arrayOfAllPathwaysWeights, analyzedPathways, tElapsed] = analyze_pathways()
    tStart = tic;
    tElapsed = 0;
    model = evalin('base', 'model');
    listOfPathways = evalin('base', 'listOfPathways');
    defines = evalin('base', 'defines');
   
     arrayOfAllPathwaysWeights = [];
    analyzedPathways = [];
    if isempty(listOfPathways)
        return;
    end
    
    initCobraToolbox;

    optimisationResult = optimizeCbModel(model);
    minimumBiomassFlux = optimisationResult.f * str2double(defines.minBiomassFluxProportion);
   
     bar = waitbar(0,'Please wait... Looking for all Graph Nodes');
    for i = 1:length(listOfPathways)
       waitbar(i/length(listOfPathways), bar, [num2str(i), ' Pathways of ', num2str(length(listOfPathways)), ' total' ])
        drawnow
            disp(['##### PATHWAY: ' num2str(i)]);
            [arrayOfAllPathwaysWeights,analyzedPathways] = ...
                    analyze_pathway (listOfPathways{i}, analyzedPathways, i, ...
                     arrayOfAllPathwaysWeights,  model, minimumBiomassFlux, false, defines);

            % save('pathway_analyzes_results.mat','arrayOfAllPathwaysWeights','analyzedPathways');
    end
      close(bar)
    tElapsed = toc(tStart)
     
end


